<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<script>
			/*
			 1. 依次输出什么:
				gb: undefined
				fb: 1
				fb: 2
				fb: 3
				fe: 3
				fe: 2
				fe: 1
				ge: 1		
				
			2. 整个过程产生了几个执行上下文?		5
			*/
			console.log("gb: " + i)
			var i = 1
			foo(1)
			function foo(i){
				if(i == 4){
					return
				}
				console.log("fb: " + i)
				foo(i + 1)
				console.log("fe: " + i)
			}
			console.log("ge: " + i)
			
			/* 面试题1
			function a(){}
			var a;
			console.log(typeof a)  // 'function'
			*/
			
			/* 面试题2
			if(!(b in window)){
				var b = 1
			}
			console.log(b)  // undefined
			 */
			
			/* 面试题3
			var c = 1
			function c(c){
				console.log(c)
			}
			c(2)  // 1
			
			等价于
			
			var c
			function c(c){
				console.log(c)
			}
			c = 1
			c(2)
			 */
			
		</script>
	</head>
	<body>
	</body>
</html>
